package com.vates.ejercicio2;

import com.google.common.base.Preconditions;

public class Profesor {

	
	public static void ponerNota(Alumno alumno){
		Preconditions.checkNotNull(alumno,"el alumno no puede ser nulo");
		Preconditions.checkNotNull(alumno.getAsignatura1());
		Preconditions.checkNotNull(alumno.getAsignatura2());
		Preconditions.checkNotNull(alumno.getAsignatura3());
		
		alumno.getAsignatura1().setNota(Math.random()*100);
		alumno.getAsignatura2().setNota(Math.random()*100);
		alumno.getAsignatura3().setNota(Math.random()*100);	
	}
	
	public static double calcularPromedio(Alumno alumno){
		Preconditions.checkNotNull(alumno);				
		return (alumno.getPromedio());
		
	}
	
	
}
